<template>
  <div class="app-container">
    <Find :OriginalFilter="{ static: true }" :formList="formList" @findClicked="findData" />
    <div class="main">
      <el-card shadow="never" :body-style="{ padding: '13px 20px 12px' }">
        <div slot="header" class="flex">
          <div class="mr55">
            <h4 class="mb9 f16" style="font-weight: 600">扫描下单条码</h4>
            <span class="f12 ps">PS:扫描指令单标签时，请确认光标置于此栏位</span>
          </div>
          <div class="flex scan mr55 f16">
            <span style="width: 85px">扫描条码</span>
            <el-input placeholder="" clearable @change=""></el-input>
          </div>
          <div class="flex scan f16">
            <span style="width: 85px">扫描信息</span>
            <el-input placeholder="" clearable @change="" disabled style="background-color: #fff5eb"></el-input>
          </div>
        </div>
      </el-card>

      <el-card shadow="never" :body-style="{ padding: '13px 20px 12px' }">
        <div slot="header" class="f16 mb9">
          <span style="font-weight: 600">成型投料扫描记录</span>
        </div>
        <Table :tableData="tableData" :tableHeader="tableHeader" :TableHeight="'210rem'" />
        <span style="color: #ff2020">PS:双击栏位排序</span>
        <!-- 分页器 -->
        <div class="bottom">
          <span class="total">共688项数据</span>
          <el-pagination
            :page-sizes="[10, 20, 30, 40]"
            layout="sizes, prev, pager, next, jumper"
            :total="600"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
          <div>
            <el-button class="save" type="primary" size="default" @click="">保存</el-button>
            <el-button type="primary" size="default" @click="">打印</el-button>
          </div>
        </div>
      </el-card>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'NeedleCarFeedingOperation'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
const formList = ref([
  {
    type: 'input',
    inputPlaceholder: '请输入指令号',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入货号',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '品牌',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      }
    ]
  },
  {
    type: 'select',
    selectValue: '采集员',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      }
    ]
  },
  {
    type: 'date',
    dateLabel: '客户交期',
    dateValue: ''
  },
  {
    type: 'date',
    dateLabel: '完成日期',
    dateValue: ''
  },
  {
    type: 'button',
    checkboxLabel: '清空'
  },
  {
    type: 'button',
    checkboxLabel: '删除扫描记录'
  },
  {
    type: 'button',
    checkboxLabel: '查询所有采集资料'
  },
  {
    type: 'button',
    checkboxLabel: '导出日报表'
  }
])

const findData = () => {}

const tableHeader = ref([
  {
    label: '采集类型',
    prop: 'instructionNumber'
  },
  {
    label: '指令号',
    prop: 'instructionNumber'
  },
  {
    label: '品牌',
    prop: 'instructionNumber'
  },
  {
    label: '货号',
    prop: 'instructionNumber'
  },
  {
    label: '颜色',
    prop: 'instructionNumber'
  },
  {
    label: '号码',
    prop: 'instructionNumber'
  },
  {
    label: '订单数量',
    prop: 'instructionNumber'
  },
  {
    label: '图片',
    fixed: true,
    prop: 'instructionNumber'
  },
  {
    label: '客户交期',
    prop: 'instructionNumber'
  },
  {
    label: '生产员工',
    prop: 'instructionNumber'
  },
  {
    label: '生产数量',
    prop: 'instructionNumber'
  },
  {
    label: '采集员',
    prop: 'instructionNumber'
  },
  {
    label: '责任单位',
    prop: 'instructionNumber'
  },
  {
    label: '补单原因',
    prop: 'instructionNumber'
  },
  {
    label: '扫描时间',
    prop: 'instructionNumber'
  }
])
const tableData = ref([])
const handleSizeChange = (val: number) => {
  console.log(`${val} items per page`)
}
const handleCurrentChange = (val: number) => {
  console.log(`current page: ${val}`)
}
</script>

<style lang="less" scoped>
.bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;

  .total {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    font-family: PingFangSC-Regular-, PingFangSC-Regular;
  }

  :deep(.el-input__wrapper) {
    padding: 0;
  }

  :deep(.el-input__suffix) {
    transform: translateX(-9px);
  }

  :deep(.el-pagination .el-select .el-input) {
    width: 88px;
  }

  :deep(.number) {
    border: 1px solid #dcdcdc;
    margin-right: 8px;
    border-radius: 3px 3px 3px 3px;
  }

  :deep(.is-active.number) {
    background-color: #f89027 !important;
    color: white;
    border-radius: 3px 3px 3px 3px;
  }

  .save {
    color: black;
    border: 1px solid #e7e7e7;
    background: #e7e7e7;
  }
}

.main {
  margin-top: 2px;
  background-color: white;
  margin-top: 10px;

  .ps {
    color: #ff2020;
  }

  .scan {
    align-items: center;
    width: 500px;
  }
}
</style>
